package com.feisuanyz.util;

import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Component;

@Component
public class ModelMapperUtil {

    private static final ModelMapper modelMapper = new ModelMapper();

    public static <T, U> T map(U source, Class<T> targetClass) {
        return modelMapper.map(source, targetClass);
    }
}